package com.nuance.assignment.fileInfo.shared;

import java.io.Serializable;

/**
 * Data Transfer Object for File. This is the class that will be used to convert
 * file information into Json format. Thus any Json marshaling related
 * annotations, if required, should be put on this class.
 * 
 * @author parag
 *
 */
public class FileDTO implements Serializable {
	private static final long serialVersionUID = 1L;

	private String name;
	private String absolutePath;
	private boolean canExecute;
	private boolean canRead;
	private boolean canWrite;
	private boolean isFile;
	private boolean isDirectory;
	private boolean isHidden;
	private boolean isAbsolute;
	private long length;
	private long lastModified;

	public FileDTO() {

	}

	public FileDTO(boolean canExecute, boolean canRead, boolean canWrite,
			boolean isFile, boolean isDirectory, boolean isHidden,
			boolean isAbsolute, long lastModified, long length,
			String absolutePath, String name) {
		super();
		this.canExecute = canExecute;
		this.canRead = canRead;
		this.canWrite = canWrite;
		this.isFile = isFile;
		this.isDirectory = isDirectory;
		this.isHidden = isHidden;
		this.isAbsolute = isAbsolute;
		this.lastModified = lastModified;
		this.length = length;
		this.absolutePath = absolutePath;
		this.name = name;
	}

	public boolean isCanExecute() {
		return canExecute;
	}

	public void setCanExecute(boolean canExecute) {
		this.canExecute = canExecute;
	}

	public boolean isCanRead() {
		return canRead;
	}

	public void setCanRead(boolean canRead) {
		this.canRead = canRead;
	}

	public boolean isCanWrite() {
		return canWrite;
	}

	public void setCanWrite(boolean canWrite) {
		this.canWrite = canWrite;
	}

	public boolean isFile() {
		return isFile;
	}

	public void setFile(boolean isFile) {
		this.isFile = isFile;
	}

	public boolean isDirectory() {
		return isDirectory;
	}

	public void setDirectory(boolean isDirectory) {
		this.isDirectory = isDirectory;
	}

	public boolean isHidden() {
		return isHidden;
	}

	public void setHidden(boolean isHidden) {
		this.isHidden = isHidden;
	}

	public boolean isAbsolute() {
		return isAbsolute;
	}

	public void setAbsolute(boolean isAbsolute) {
		this.isAbsolute = isAbsolute;
	}

	public long getLastModified() {
		return lastModified;
	}

	public void setLastModified(long lastModified) {
		this.lastModified = lastModified;
	}

	public long getLength() {
		return length;
	}

	public void setLength(long length) {
		this.length = length;
	}

	public String getAbsolutePath() {
		return absolutePath;
	}

	public void setAbsolutePath(String absolutePath) {
		this.absolutePath = absolutePath;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "FileDTO [NAME=" + name + ", absolutePath=" + absolutePath
				+ ", CAN_EXECUTE=" + canExecute + ", CAN_READ=" + canRead
				+ ", CAN_WRITE=" + canWrite + ", IS_FILE=" + isFile
				+ ", IS_DIRECTORY=" + isDirectory + ", IS_HIDDEN=" + isHidden
				+ ", IS_ABSOLUTE=" + isAbsolute + ", LENGTH=" + length
				+ ", LAST_MODIFIED=" + lastModified + "]";
	}

}
